package com.example.petshopping.model;

import java.util.List;

/**
 * 与后端 AppProductSpuDetailRespVO 对应的前端响应对象
 */
public class AppProductSpuDetailRespVO {

    // 基本信息
    private Long id;
    private String name;
    private String introduction;
    private String description;
    private Long categoryId;
    private String picUrl;
    private List<String> sliderPicUrls;

    // SKU/价格库存等
    private Boolean specType;
    // 单位：分
    private Integer price;
    private Integer marketPrice;
    private Integer stock;

    // 统计
    private Integer salesCount;

    private List<Sku> skus;

    public static class Sku {
        private Long id;
        private List<PropertyValue> properties;
        private Integer price;
        private Integer marketPrice;
        private Integer vipPrice;
        private String picUrl;
        private Integer stock;
        private Double weight;
        private Double volume;

        public Long getId() { return id; }
        public void setId(Long id) { this.id = id; }
        public List<PropertyValue> getProperties() { return properties; }
        public void setProperties(List<PropertyValue> properties) { this.properties = properties; }
        public Integer getPrice() { return price; }
        public void setPrice(Integer price) { this.price = price; }
        public Integer getMarketPrice() { return marketPrice; }
        public void setMarketPrice(Integer marketPrice) { this.marketPrice = marketPrice; }
        public Integer getVipPrice() { return vipPrice; }
        public void setVipPrice(Integer vipPrice) { this.vipPrice = vipPrice; }
        public String getPicUrl() { return picUrl; }
        public void setPicUrl(String picUrl) { this.picUrl = picUrl; }
        public Integer getStock() { return stock; }
        public void setStock(Integer stock) { this.stock = stock; }
        public Double getWeight() { return weight; }
        public void setWeight(Double weight) { this.weight = weight; }
        public Double getVolume() { return volume; }
        public void setVolume(Double volume) { this.volume = volume; }
    }

    /**
     * 为了兼容后端属性结构，定义一个最小字段集合的占位对象
     */
    public static class PropertyValue {
        private Long propertyId;
        private Long valueId;
        private String name;
        private String valueName;

        public Long getPropertyId() { return propertyId; }
        public void setPropertyId(Long propertyId) { this.propertyId = propertyId; }
        public Long getValueId() { return valueId; }
        public void setValueId(Long valueId) { this.valueId = valueId; }
        public String getName() { return name; }
        public void setName(String name) { this.name = name; }
        public String getValueName() { return valueName; }
        public void setValueName(String valueName) { this.valueName = valueName; }
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getIntroduction() { return introduction; }
    public void setIntroduction(String introduction) { this.introduction = introduction; }
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    public Long getCategoryId() { return categoryId; }
    public void setCategoryId(Long categoryId) { this.categoryId = categoryId; }
    public String getPicUrl() { return picUrl; }
    public void setPicUrl(String picUrl) { this.picUrl = picUrl; }
    public List<String> getSliderPicUrls() { return sliderPicUrls; }
    public void setSliderPicUrls(List<String> sliderPicUrls) { this.sliderPicUrls = sliderPicUrls; }
    public Boolean getSpecType() { return specType; }
    public void setSpecType(Boolean specType) { this.specType = specType; }
    public Integer getPrice() { return price; }
    public void setPrice(Integer price) { this.price = price; }
    public Integer getMarketPrice() { return marketPrice; }
    public void setMarketPrice(Integer marketPrice) { this.marketPrice = marketPrice; }
    public Integer getStock() { return stock; }
    public void setStock(Integer stock) { this.stock = stock; }
    public Integer getSalesCount() { return salesCount; }
    public void setSalesCount(Integer salesCount) { this.salesCount = salesCount; }
    public List<Sku> getSkus() { return skus; }
    public void setSkus(List<Sku> skus) { this.skus = skus; }
}


